home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / we-30d.zip / WEEXTSRC.ZI_ / WE_EXT.H < prev    next >
Text File  |  1993-08-23  |  12KB  |  321 lines

  1. /*-------------------------------------------------------------------------*\
  2.  |                                                                         |
  3.  |                                                                         |
  4.  |  WE_EXT.H - Include file for WinEdit DLL Extension Processor            |
  5.  |                                                                         |
  6.  |                                                                         |
  7. \*-------------------------------------------------------------------------*/
  8.  
  9.  
  10.  
  11.  
  12. /*
  13.  *  all extension commands fall in this range
  14.  *
  15.  */
  16.  
  17. #define WE_CMDFIRST               WM_USER +  100
  18. #define WE_CMDLAST                WM_USER +  999
  19.  
  20.  
  21.  
  22. /*
  23.  *  all user-defined command IDs must be in this range
  24.  *
  25.  */
  26.  
  27. #define WE_EXTFIRST               WM_USER + 500
  28. #define WE_EXTLAST                WE_CMDLAST
  29.  
  30.  
  31. /*
  32.  *
  33.  *  W M _ C O M M A N D   I D   V A L U E S
  34.  *
  35.  *
  36.  *  Sample use shown in:    SAMPLES\TEMPLATE\WE_EXT.RC
  37.  *
  38.  *
  39.  *  You can define menu items to use
  40.  *  the following internal WinEdit command IDs.  Your DLL
  41.  *  will NOT be called to handle these events.  You can
  42.  *  also use SendMessage() or PostMessage() to send these
  43.  *  command IDs as the wParam value in a WM_COMMAND message
  44.  *  to WinEdit.
  45.  *
  46.  */
  47.  
  48.  
  49. #define IDM_FILENEW                5001
  50. #define IDM_FILEOPEN               5002
  51. #define IDM_FILEMERGE              5003
  52. #define IDM_FILELIST               5004
  53. #define IDM_FILESAVE               5005
  54. #define IDM_FILESAVEAS             5006
  55. #define IDM_FILEPRINT              5007
  56. #define IDM_FILEPRINTERSETUP       5008
  57. #define IDM_FILEPAGESETUP          5009
  58. #define IDM_FILESETPREF            5010
  59. #define IDM_FILEKEYS               5011
  60. #define IDM_FILEEXIT               5012
  61.  
  62. #define IDM_EDITUNDO               5013
  63. #define IDM_EDITREDO               5014
  64. #define IDM_EDITCUT                5015
  65. #define IDM_EDITCOPY               5016
  66. #define IDM_EDITPASTE              5017
  67. #define IDM_EDITCLEAR              5018
  68. #define IDM_EDITUP                 5019
  69. #define IDM_EDITDOWN               5020
  70. #define IDM_EDITLEFT               5021
  71. #define IDM_EDITRIGHT              5022
  72. #define IDM_EDITHOME               5023
  73. #define IDM_EDITEND                5024
  74. #define IDM_EDITPAGEUP             5025
  75. #define IDM_EDITPAGEDOWN           5026
  76. #define IDM_EDITWORDLEFT           5027
  77. #define IDM_EDITWORDRIGHT          5028
  78. #define IDM_EDITTOPOFFILE          5029
  79. #define IDM_EDITENDOFFILE          5030
  80. #define IDM_EDITTAB                5031
  81. #define IDM_EDITBACKTAB            5032
  82. #define IDM_EDITSELECTALL          5033
  83. #define IDM_EDITSTARTSELECTION     5034
  84. #define IDM_EDITENDSELECTION       5035
  85. #define IDM_EDITSELECTLEFT         5036
  86. #define IDM_EDITSELECTRIGHT        5037
  87. #define IDM_EDITSELECTUP           5038
  88. #define IDM_EDITSELECTDOWN         5039
  89. #define IDM_EDITSELECTHOME         5040
  90. #define IDM_EDITSELECTEND          5041
  91. #define IDM_EDITSELECTPAGEUP       5042
  92. #define IDM_EDITSELECTPAGEDOWN     5043
  93. #define IDM_EDITSELECTWORDLEFT     5044
  94. #define IDM_EDITSELECTWORDRIGHT    5045
  95. #define IDM_EDITSELECTTOPOFFILE    5046
  96. #define IDM_EDITSELECTENDOFFILE    5047
  97. #define IDM_EDITTOGGLEWRAP         5048
  98. #define IDM_EDITTOGGLEINS          5049
  99. #define IDM_EDITTOGGLEAUTOINDENT   5050
  100. #define IDM_EDITINSERTSTRING       5051
  101. #define IDM_EDITBACKSPACE          5052
  102. #define IDM_EDITCOPYLINE           5053
  103. #define IDM_EDITCUTLINE            5054
  104. #define IDM_EDITGOTOLINE           5055
  105. #define IDM_EDITGOTOCOLUMN         5056
  106. #define IDM_EDITSETCOLUMNBLOCK     5057
  107.  
  108. #define IDM_SEARCHFIND             5058
  109. #define IDM_SEARCHNEXT             5059
  110. #define IDM_SEARCHCHANGE           5060
  111. #define IDM_SEARCHNEXTERR          5061
  112. #define IDM_SEARCHPREVERR          5062
  113. #define IDM_SEARCHVIEWEDOUT        5063
  114.  
  115. #define IDM_MACROSTARTRECORD       5064
  116.  
  117. #define IDM_COMPILE                5065
  118. #define IDM_MAKE                   5066
  119. #define IDM_REBUILD                5067
  120. #define IDM_DEBUG                  5068
  121. #define IDM_EXECUTE                5069
  122. #define IDM_MAKECONFIG             5070
  123.  
  124. #define IDM_WINDOWMIN              5071
  125. #define IDM_WINDOWMAX              5072
  126. #define IDM_WINDOWNEXT             5073
  127. #define IDM_WINDOWRESTORE          5074
  128. #define IDM_WINDOWCLOSE            5075
  129. #define IDM_WINDOWTILE             5076
  130. #define IDM_WINDOWCASCADE          5077
  131. #define IDM_WINDOWICONS            5078
  132. #define IDM_WINDOWCLOSEALL         5079
  133. #define IDM_WINDOWCHILD            5300
  134.  
  135. #define IDM_HELPINDEX              5081
  136. #define IDM_HELPKEYBOARD           5082
  137. #define IDM_HELPCOMMANDS           5083
  138. #define IDM_HELPPROCEDURES         5084
  139. #define IDM_HELPHELP               5085
  140. #define IDM_HELPKEYWORDS           5086
  141. #define IDM_HELPABOUT              5087
  142.  
  143. #define IDM_TOOLBAR                5206
  144.  
  145.  
  146. /*
  147.  *  Request and Notifications message IDs sent to your DLL by
  148.  *  WinEdit.  Check the sample file WE_EXT.C and the
  149.  *  documentation for details on the responses your DLL is
  150.  *  expected to return to WinEdit.
  151.  *
  152.  */
  153.  
  154. #define WEN_LOADMENU               WE_CMDFIRST + 200
  155. #define WEN_GETWINDOWMENU          WE_CMDFIRST + 201
  156. #define WEN_GETMACROMENU           WE_CMDFIRST + 202
  157. #define WEN_LOADSHORTMENU          WE_CMDFIRST + 203
  158. #define WEN_END                    WE_CMDFIRST + 204
  159. #define WEN_LOADACCELS             WE_CMDFIRST + 205
  160. #define WEN_INITMENU               WE_CMDFIRST + 206
  161. #define WEN_MACROSTARTPLAY         WE_CMDFIRST + 207
  162. #define WEN_MACROSTOPPLAY          WE_CMDFIRST + 208
  163. #define WEN_MACROSTARTRECORD       WE_CMDFIRST + 209
  164. #define WEN_MACROSTOPRECORD        WE_CMDFIRST + 210
  165. #define WEN_RBUTTONDOWN            WE_CMDFIRST + 211
  166. #define WEN_RBUTTONDOWNC           WE_CMDFIRST + 212
  167. #define WEN_RBUTTONDOWNS           WE_CMDFIRST + 213
  168. #define WEN_RBUTTONDOWNSC          WE_CMDFIRST + 214
  169.  
  170.  
  171. /*
  172.  *  lParam struct used in the WEM_SEARCH* messages
  173.  *  to pass the search and replace parameters
  174.  */
  175.  
  176. typedef struct tagSEARCHRECORD
  177.    {
  178.    UINT      fComplain:    1;    /* show 'not found' etc. to user      */
  179.    UINT      fPrompt:      1;    /* bring up search/replace dialog box */
  180.    UINT      fMatchCase:   1;    /* exact case match only              */
  181.    UINT      fForward:     1;    /* forward direction                  */
  182.    UINT      fChangeAll:   1;    /* change all                         */
  183.    UINT      fConfirm:     1;    /* ask user to confirm changes        */
  184.    UINT      fRegular:     1;    /* use regular expression             */
  185.    UINT      fUnused:      9;
  186.    LPSTR     lpSearchText;       /* string to search for               */
  187.    LPSTR     lpReplaceText;      /* string to replace found text with  */
  188.    } SEARCHRECORD;
  189.  
  190. typedef SEARCHRECORD FAR *LPSEARCHRECORD;
  191.  
  192. /* icon ID values you can use with edAddButton and edDeleteButton */
  193.  
  194. #define IDLEXICON   6    /* main icon              */
  195. #define IDNOTE      2    /* icon for child windows */
  196. #define IDONEUP     4    /* one-up print icon      */
  197. #define IDTWOUP     5    /* two-up print icon      */
  198.  
  199. #define OPEN       48    /* file open              */
  200. #define SAVE       49    /* file save              */
  201. #define PRINT      50    /* file print             */
  202. #define FIND       51    /* find                   */
  203. #define FINDNEXT   52    /* find next              */
  204. #define CHANGE     53    /* change                 */
  205. #define NEXT       54    /* next error             */
  206. #define PREV       55    /* prev error             */
  207. #define COMPILE    56    /* compile                */
  208. #define MAKE       57    /* make                   */
  209. #define REBUILD    58    /* rebuild                */
  210. #define DEBUGICON  59    /* debug                  */
  211. #define EXECUTE    60    /* execute                */
  212. #define CUT        61    /* cut                    */
  213. #define COPY       62    /* copy                   */
  214. #define PASTE      63    /* paste                  */
  215. #define HELPKEY    64    /* key word help          */
  216. #define UNDO       65    /* undo                   */
  217. #define REDO       66    /* redo                   */
  218. #define FILELIST   67    /* filelist               */
  219.  
  220.  
  221. /*
  222.  *  function prototypes
  223.  *
  224.  */
  225. int WINAPI edFileNew(HWND hWnd);
  226. int WINAPI edFileOpen(HWND hWnd, LPSTR lpFileName);
  227. int WINAPI edFileMerge(HWND hWnd, LPSTR lpFileName);
  228. int WINAPI edFileSave(HWND hWnd);
  229. int WINAPI edFileSaveAs(HWND hWnd, LPSTR lpFileName);
  230. int WINAPI edFilePrint(HWND hWnd);
  231. int WINAPI edFilePageSetup(HWND hWnd);
  232. int WINAPI edFilePrinterSetup(HWND hWnd);
  233. int WINAPI edFileSetPreferences(HWND hWnd);
  234. int WINAPI edFileExit(HWND hWnd);
  235. int WINAPI edFileList(HWND hWnd);
  236.  
  237. int WINAPI edEditUndo(HWND hWnd);
  238. int WINAPI edEditRedo(HWND hWnd);
  239. int WINAPI edEditCut(HWND hWnd);
  240. int WINAPI edEditCopy(HWND hWnd);
  241. int WINAPI edEditPaste(HWND hWnd);
  242. int WINAPI edEditDelete(HWND hWnd);
  243. int WINAPI edEditToggleIns(HWND hWnd);
  244. int WINAPI edEditWrap(HWND hWnd);
  245. int WINAPI edEditSetColumnBlock(HWND hWnd);
  246. int WINAPI edEditInsertString(HWND hWnd, LPSTR lpString);
  247. int WINAPI edEditBackspace(HWND hWnd);
  248. int WINAPI edEditSelectAll(HWND hWnd);
  249. int WINAPI edEditCopyLine(HWND hWnd);
  250. int WINAPI edEditCutLine(HWND hWnd);
  251. int WINAPI edEditGoToLine(HWND hWnd, int iLineNo);
  252. int WINAPI edEditGoToColumn(HWND hWnd, int iColNo);
  253. int WINAPI edEditBeginningOfLine(HWND hWnd);
  254. int WINAPI edEditEndOfLine(HWND hWnd);
  255. int WINAPI edEditBeginningOfFile(HWND hWnd);
  256. int WINAPI edEditEndOfFile(HWND hWnd);
  257. int WINAPI edEditUpLine(HWND hWnd);
  258. int WINAPI edEditDownLine(HWND hWnd);
  259. int WINAPI edEditLeft(HWND hWnd);
  260. int WINAPI edEditRight(HWND hWnd);
  261. int WINAPI edEditPageUp(HWND hWnd);
  262. int WINAPI edEditPageDown(HWND hWnd);
  263. int WINAPI edEditWordLeft(HWND hWnd);
  264. int WINAPI edEditWordRight(HWND hWnd);
  265. int WINAPI edEditStartSelection(HWND hWnd);
  266. int WINAPI edEditEndSelection(HWND hWnd);
  267. int WINAPI edEditClearSelection(HWND hWnd);
  268. int WINAPI edEditSetBookMark(HWND hWnd, int iMark);
  269. int WINAPI edEditGoToBookMark(HWND hWnd, int iMark);
  270. int WINAPI edEditTab(HWND hWnd);
  271. int WINAPI edEditBackTab(HWND hWnd);
  272. int WINAPI edEditGetCurrentWord(HWND hWnd, LPSTR lpBuffer, int iLength);
  273. int WINAPI edSearchFind(HWND hWnd, LPSEARCHRECORD lpSearch);
  274. int WINAPI edSearchRepeat(HWND hWnd, LPSEARCHRECORD lpSearch);
  275. int WINAPI edSearchChange(HWND hWnd, LPSEARCHRECORD lpSearch);
  276. int WINAPI edSearchNextError(HWND hWnd);
  277. int WINAPI edSearchPrevError(HWND hWnd);
  278. int WINAPI edSearchViewOutput(HWND hWnd);
  279.  
  280. int WINAPI edRunCompile(HWND hWnd);
  281. int WINAPI edRunMake(HWND hWnd);
  282. int WINAPI edRunRebuild(HWND hWnd);
  283. int WINAPI edRunDebug(HWND hWnd);
  284. int WINAPI edRunExecute(HWND hWnd);
  285. int WINAPI edRunCommand(HWND hWnd, BOOL bWait, BOOL bCapture, LPSTR lpCommand);
  286. int WINAPI edRunConfigure(HWND hWnd);
  287.  
  288. int WINAPI edWindowTile(HWND hWnd);
  289. int WINAPI edWindowCascade(HWND hWnd);
  290. int WINAPI edWindowArrangeIcons(HWND hWnd);
  291. int WINAPI edWindowNext(HWND hWnd);
  292. int WINAPI edWindowMinimize(HWND hWnd);
  293. int WINAPI edWindowMaximize(HWND hWnd);
  294. int WINAPI edWindowRestore(HWND hWnd);
  295. int WINAPI edWindowClose(HWND hWnd);
  296. int WINAPI edWindowCloseAll(HWND hWnd);
  297.  
  298. int WINAPI edHelpIndex(HWND hWnd);
  299. int WINAPI edHelpKeyboard(HWND hWnd);
  300. int WINAPI edHelpCommands(HWND hWnd);
  301. int WINAPI edHelpProcedures(HWND hWnd);
  302. int WINAPI edHelpKeyWord(HWND hWnd);
  303. int WINAPI edHelpHelp(HWND hWnd);
  304. int WINAPI edHelpAbout(HWND hWnd);
  305.  
  306. int WINAPI edAddButton(HWND hWnd, WORD wIcon, WORD wCommand, WORD wPosition);
  307. int WINAPI edDeleteButton(HWND hWnd, WORD wPosition, WORD wCommand);
  308.  
  309. int WINAPI edGetModifiedStatus(HWND hWnd);
  310. int WINAPI edGetLineNumber(HWND hWnd);
  311. int WINAPI edGetColumnNumber(HWND hWnd);
  312. int WINAPI edGetSelectionState(HWND hWnd, LPPOINT ptStart, LPPOINT ptEnd);
  313. int WINAPI edGetUndoState(HWND hWnd);
  314. int WINAPI edGetRedoState(HWND hWnd);
  315. int WINAPI edGetWordWrapState(HWND hWnd);
  316. int WINAPI edGetInsertState(HWND hWnd);
  317. int WINAPI edGetWindowName(HWND hWnd, LPSTR lpBuffer, int iSize);
  318. int WINAPI edGetChar(HWND hWnd);
  319. int WINAPI edRecord(HWND hWnd);
  320. int WINAPI edStatusMsg(HWND hWnd, LPSTR lpString);
  321.